package com.scwatch.core.repository;

import com.scwatch.common.orm.Limitable;
import com.scwatch.core.domain.HotWord;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.repository.Repository;

import java.util.List;

/**
 * Created by rh005 on 2017/7/12.
 */
public interface HotWordDao extends Repository<HotWord, Integer> {
    public Page<HotWord> findAll(Specification<HotWord> spec,
                                 Pageable pageable);

    public List<HotWord> findAll(Specification<HotWord> spec,
                                       Limitable limitable);

    public HotWord findOne(Integer id);

    public HotWord save(HotWord bean);

    public void delete(HotWord bean);

    // ---------------------------------------------------

    public List<HotWord> findByStatus(int status);
}
